﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DSAServer.Models.Output
{
    /// <summary>
    /// 订单信息
    /// </summary>
    public class OrderInfo
    {
        public OrderInfo()
        {
            details = new List<OrderDetail>();
        }

        public string no { get; set; }
        public string wangwang { get; set; }
        public int num { get; set; }
        public DateTime time { get; set; }
        public List<OrderDetail> details { get; set; }
        public bool hasdownload { get; set; }
        public DateTime? downloadtime { get; set; }
        public bool hassend { get; set; }
        public DateTime? sendtime { get; set; }
        public string printwangwang { get; set; }
        public int source { get; set; }
    }

    //public class OrderDetail
    //{
    //    public OrderDetail()
    //    {
    //        images = new List<OrderImage>();
    //    }
    //    /// <summary>
    //    /// 包装类型:冷表,过塑
    //    /// </summary>
    //    public string packagetype { get; set; }
    //    /// <summary>
    //    /// 订单编号
    //    /// </summary>
    //    public string no { get; set; }
    //    /// <summary>
    //    /// 产品名称
    //    /// </summary>
    //    public string name { get; set; }
    //    /// <summary>
    //    /// 照片类型
    //    /// </summary>
    //    public string type { get; set; }
    //    /// <summary>
    //    /// 材质
    //    /// </summary>
    //    public string paper { get; set; }
    //    /// <summary>
    //    /// 尺寸
    //    /// </summary>
    //    public string size { get; set; }
    //    /// <summary>
    //    /// 数量
    //    /// </summary>
    //    public int num { get; set; }
    //    /// <summary>
    //    /// 来源
    //    /// </summary>
    //    public int source { get; set; }
    //    /// <summary>
    //    /// 上传通道
    //    /// </summary>
    //    public int uploadtype { get; set; }
    //    /// <summary>
    //    /// 产品缩略图
    //    /// </summary>
    //    public string imgurl { get; set; }
    //    /// <summary>
    //    /// 照片宽高比
    //    /// </summary>
    //    public decimal aspectRatio { get; set; }
    //    public List<OrderImage> images { get; set; }
    //}

    //public class OrderImage
    //{
    //    public string imageurl { get; set; }
    //    public int num { get; set; }
    //    public string rotateangle { get; set; }
    //    public string Height { get; set; }
    //    public string Width { get; set; }
    //    public string X { get; set; }
    //    public string Y { get; set; }
    //}

    public class OrderDetail
    {
        public OrderDetail()
        {
            images = new List<OrderImage>();
        }
        /// <summary>
        /// 交易编号
        /// </summary>
        public string ono { get; set; }
        //private List<string> _localIds = new List<string>();
        ///// <summary>
        ///// 本地资源ID
        ///// </summary>
        //public List<string> localIds
        //{
        //    get { return _localIds; }
        //    set { _localIds = value; }
        //}
        /// <summary>
        /// 包装类型:冷表,过塑
        /// </summary>
        public string packagetype { get; set; }
        /// <summary>
        /// 订单编号
        /// </summary>
        public string no { get; set; }
        /// <summary>
        /// 产品名称
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 照片类型
        /// </summary>
        public string type { get; set; }
        /// <summary>
        /// 材质
        /// </summary>
        public string paper { get; set; }
        /// <summary>
        /// 尺寸
        /// </summary>
        public string size { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public int num { get; set; }

        private int _uploadnum = 0;
        /// <summary>
        /// 已上传数量
        /// </summary>
        public int uploadnum
        {
            get { return _uploadnum; }
            set { _uploadnum = value; }
        }
        /// <summary>
        /// 来源
        /// </summary>
        public int source { get; set; }
        /// <summary>
        /// 上传通道
        /// </summary>
        public int uploadtype { get; set; }
        /// <summary>
        /// 产品缩略图
        /// </summary>
        public string imgurl { get; set; }
        /// <summary>
        /// 照片宽高比
        /// </summary>
        public decimal aspectRatio { get; set; }
        /// <summary>
        /// 订单照片信息
        /// </summary>
        public List<OrderImage> images { get; set; }
    }

    public class OrderImage
    {
        /// <summary>
        /// 卖家裁剪
        /// </summary>
        public bool sellerCut { get; set; }
        private bool _IsCut = true;
        /// <summary>
        /// 客户是否裁剪
        /// </summary>
        public bool IsCut
        {
            get { return _IsCut; }
            set { _IsCut = value; }
        }
        public int tubW { get; set; }
        public int tubH { get; set; }
        /// <summary>
        /// 微信图片地址
        /// </summary>
        public string serverid { get; set; }
        /// <summary>
        /// 图片地址
        /// </summary>
        public string url { get; set; }
        /// <summary>
        /// 图片真实宽度
        /// </summary>
        public int Width { get; set; }
        /// <summary>
        /// 图片真实高度
        /// </summary>
        public int Height { get; set; }

        /// <summary>
        /// 显示宽度
        /// </summary>
        public decimal WidgetWidth { get; set; }
        /// <summary>
        /// 显示高度
        /// </summary>
        public decimal WidgetHeight { get; set; }
        /// <summary>
        /// 起始X
        /// </summary>
        public decimal BeginX { get; set; }
        /// <summary>
        /// 起始Y
        /// </summary>
        public decimal BeginY { get; set; }
        /// <summary>
        /// 结束X
        /// </summary>
        public decimal EndX { get; set; }
        /// <summary>
        /// 结束Y
        /// </summary>
        public decimal EndY { get; set; }

        /// <summary>
        /// 旋转角度
        /// </summary>
        public int rotateangle { get; set; }
        /// <summary>
        /// X坐标
        /// </summary>
        public int X { get; set; }
        /// <summary>
        /// Y坐标
        /// </summary>
        public int Y { get; set; }
        /// <summary>
        /// 裁剪宽度
        /// </summary>
        public int CutW { get; set; }
        /// <summary>
        /// 裁剪高度
        /// </summary>
        public int CutH { get; set; }
        private int _num = 1;
        /// <summary>
        /// 图片数量
        /// </summary>
        public int num
        {
            get { return _num; }
            set { _num = value; }
        }
    }
}